package com.wps.www;

import java.util.Arrays;

public class Test {
    public static int[] func(int[] nums,int target){
        for (int i=0;i<nums.length;i++){
            for (int j=0;j< nums.length;j++){
                int tmp=nums[i]+nums[j];
                if(tmp==target){
                    return new int[] {i,j};
                }
            }
        }
        return null;
    }
    public static void main(String[] args) {
        Test solution=new Test();
        int[] add={1,5,6,7,2,3};
        int target=5;
        int[] sum=solution.func(add,target);
        System.out.println("["+sum[0]+","+sum[1]+"]");
    }
}
